<template>
	<view class="content">
		<view style="height: 120rpx;"></view>
		<view class="mar" style="width: 647rpx;box-sizing: border-box;background-size: 100% 100%;background-image: url('../../static/tu12.png');">
			<view class="dis disAl disJuC foSi50 fowe600" style="height: 120rpx;">扫码咨询</view>
			<view v-if="contactUs" class="wid100">
				<view style="height: 90rpx;"></view>
				<view class="wid90 mar dis disAl disJuB">
					<image :show-menu-by-longpress="true" mode="widthFix" :src="ossurl+contactUs.interpret[0]" style="width: 49%;"></image>
					<image :show-menu-by-longpress="true" mode="widthFix" :src="ossurl+contactUs.interpret[1]" style="width: 49%;"></image>
				</view>
				<view style="height: 40rpx;"></view>
				<view class="foSi30 mar" style="color: #777777;width: 50%;">
					<view>手机：{{contactUs.phone}}</view>
					<view>座机：{{contactUs.tel}}</view>
				</view>
				<view style="height: 70rpx;"></view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				url: this.global.url,
				ossurl:this.global.ossurl,
				contactUs:''
			}
		},
		onLoad() {
			var that = this;
			that.contactus();
			that.alioss()
		},
		methods: { 
			alioss(){
				var that  = this;
				uni.request({
				    // http://jufeng.tengshuokeji.cn//yonghu/order/order_comments
				    url: that.global.url + '/api/index/alioss',
				    method: "POST",
				    data: {},
				    success(res) {
				        let result = res.data
				        console.log(result)
				        if (result.code == 1) {
				            that.global.ossurl = result.data
							console.log(that.global.ossurl);
							that.ossurl = that.global.ossurl;
				        }
				    }
				})
			},
			contactus(){
				var that = this
				uni.request({
					url: that.global.url+'/api/index/contactUs',
					method: 'POST',
					header: {},
					data: {
					},
					success:(res)=>{
						console.log(res);
						var apiResult = res.data
						if(apiResult.code == 1){
							that.contactUs = apiResult.data;
						}
					}
				})
			}
		}
	}
</script>

<style>
	.content {
		height: 100vh;
		background-color: #F6F3EE;
	}
</style>
